package com.java46.carera.base.mapper;

import com.java46.carera.base.entity.Repertory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface RepertoryMapper {

    //    查询所有库存可根据关键字查询
    List<Repertory> selectAll(String keywords)throws Exception;

    //    通过库存编号查询库存记录
    Repertory selectByRepid(Integer repid)throws Exception;

    //    新增配件
    void insertRepertory(Repertory repertory)throws Exception;

    //    通过库存编号删除库存记录
    void deleteByRepid(Integer repid)throws Exception;

    //    通过库存编号修改库存记录
    void updateByRepid(Repertory repertory)throws Exception;

    //    入库操作
    void updateEnterRepNum(@Param("number") Integer number, @Param("repid") Integer repid)throws Exception;

    //    出库操作
    void updateOutRepNum(@Param("number") Integer number, @Param("repid") Integer repid)throws Exception;
}